<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>OAuth in Action: OAuth Client</title>

    <!-- Bootstrap -->
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
	<style>
	body {
	  padding-top: 60px;
	}
	.navbar-inverse {
		background-color: #223;
	}
	</style>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>

    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <a class="navbar-brand" href="/">OAuth in Action: <span class="label label-primary">OAuth Client</span></a>
        </div>
      </div>
    </nav>

    <div class="container">

      <div class="row">
		  
		  <div class="col-md-4">
			  <div class="well">
				  <h3>Read the current value</h3>
				  <% if (result == 'get') { %><p><span class="label label-success">Success</span></p><% } %>
				  <% if (result == 'noget') { %><p><span class="label label-danger">Failure</span></p><% } %>
				  <p><%- words ? 'Words: ' + words : ''%></p>
				  <p><%- timestamp ? 'Timestamp: ' + timestamp : ''%></p>
			  	  <a class="btn btn-info" href="/get_words">GET current value</a> 
			  </div>
		  </div>
		  <div class="col-md-4">
			  <div class="well">
				  <h3>Add a word to the list</h3>
				  <% if (result == 'add') { %><p><span class="label label-success">Success</span></p><% } %>
				  <% if (result == 'noadd') { %><p><span class="label label-danger">Failure</span></p><% } %>
				  <form class="form" action="/add_word" method="GET">
					  <input type="text" name="word" placeholder="word">
					  <input type="submit" class="btn btn-warning" href="/" value="POST a new word" >
				  </form>
			  </div>
		  </div>
		  <div class="col-md-4">
			  <div class="well">
				  <h3>Remove the last word from the list</h3>
				  <% if (result == 'rm') { %><p><span class="label label-success">Success</span></p><% } %>
				  <% if (result == 'norm') { %><p><span class="label label-danger">Failure</span></p><% } %>
 			  	  <a class="btn btn-danger" href="/delete_word">DELETE the last word</a> 
			  </div>
		  </div>
		  
      </div>

    </div><!-- /.container -->

	
	
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  </body>
</html>
